<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8" />
		<title>求1-100的和</title>
	</head>
	<body>
		<script>
			function sum(){
				// let res = 0;
				// for(let i = 1;i<=100;i++){
				// 	res += i;
				// }
				// return res;
				return (1 + 100) * 100 / 2;
			}
			console.log(sum());
		</script>
	</body>
</html>
